Micron Document
πŸŽ–οΈGitΠ―Ρ€Π°πŸŽ–οΈ

Commit 40413be93b55705eb2211bad598206381c6f3c4b


Parents : 492a5c7
Author : James Rich <2199651+jamesarich@users.noreply.github.com>
Signature : Signature validation error
Date : 2026-08-11T17:32:27-07:00
Committer : GitHub <noreply@github.com>
Date : 2026-08-12T00:32:27Z

fix(i18n): localize emoji picker strings (#6628)

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>

Changes
Diff

diff --git a/.skills/compose-ui/strings-index.txt b/.skills/compose-ui/strings-index.txt
index 65f96685b6..8c8e1fdad4 100644
--- a/.skills/compose-ui/strings-index.txt
+++ b/.skills/compose-ui/strings-index.txt
@@ -542,6 +542,19 @@ edit
edit_custom_tile_source
eight_hours
elevation_suffix
+### EMOJI ###
+emoji_category_activities
+emoji_category_animals_nature
+emoji_category_flags
+emoji_category_food_drink
+emoji_category_objects
+emoji_category_people_body
+emoji_category_smileys_emotion
+emoji_category_symbols
+emoji_category_travel_places
+emoji_load_error
+emoji_no_results
+emoji_recently_used
enable_power_saving_mode
enabled
### ENCRYPTION ###

diff --git a/core/resources/src/commonMain/composeResources/values/strings.xml b/core/resources/src/commonMain/composeResources/values/strings.xml
index 5bf24e22e9..4b7af67a04 100644
--- a/core/resources/src/commonMain/composeResources/values/strings.xml
+++ b/core/resources/src/commonMain/composeResources/values/strings.xml
@@ -569,6 +569,19 @@
<string name="edit_custom_tile_source">Edit Network Tile Source</string>
<string name="eight_hours">8 Hours</string>
<string name="elevation_suffix" translatable="false">MSL</string>
+ <!-- EMOJI -->
+ <string name="emoji_category_activities">Activities</string>
+ <string name="emoji_category_animals_nature">Animals &amp; Nature</string>
+ <string name="emoji_category_flags">Flags</string>
+ <string name="emoji_category_food_drink">Food &amp; Drink</string>
+ <string name="emoji_category_objects">Objects</string>
+ <string name="emoji_category_people_body">People &amp; Body</string>
+ <string name="emoji_category_smileys_emotion">Smileys &amp; Emotion</string>
+ <string name="emoji_category_symbols">Symbols</string>
+ <string name="emoji_category_travel_places">Travel &amp; Places</string>
+ <string name="emoji_load_error">Unable to load emoji</string>
+ <string name="emoji_no_results">No emoji found</string>
+ <string name="emoji_recently_used">Recently Used</string>
<string name="enable_power_saving_mode">Enable power saving mode</string>
<string name="enabled">Enabled</string>
<!-- ENCRYPTION -->

diff --git a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/emoji/EmojiPickerDialog.kt b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/emoji/EmojiPickerDialog.kt
index 042a558262..756afec952 100644
--- a/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/emoji/EmojiPickerDialog.kt
+++ b/core/ui/src/commonMain/kotlin/org/meshtastic/core/ui/emoji/EmojiPickerDialog.kt
@@ -81,6 +81,18 @@ import org.jetbrains.compose.resources.stringResource
import org.koin.compose.viewmodel.koinViewModel
import org.meshtastic.core.resources.Res
import org.meshtastic.core.resources.clear
+import org.meshtastic.core.resources.emoji_category_activities
+import org.meshtastic.core.resources.emoji_category_animals_nature
+import org.meshtastic.core.resources.emoji_category_flags
+import org.meshtastic.core.resources.emoji_category_food_drink
+import org.meshtastic.core.resources.emoji_category_objects
+import org.meshtastic.core.resources.emoji_category_people_body
+import org.meshtastic.core.resources.emoji_category_smileys_emotion
+import org.meshtastic.core.resources.emoji_category_symbols
+import org.meshtastic.core.resources.emoji_category_travel_places
+import org.meshtastic.core.resources.emoji_load_error
+import org.meshtastic.core.resources.emoji_no_results
+import org.meshtastic.core.resources.emoji_recently_used
import org.meshtastic.core.resources.search_emoji
import org.meshtastic.core.ui.icon.Close
import org.meshtastic.core.ui.icon.MeshtasticIcons
@@ -151,7 +163,7 @@ fun EmojiPickerDialog(
if (loadError) {
Box(modifier = Modifier.fillMaxWidth().height(200.dp), contentAlignment = Alignment.Center) {
Text(
- text = "Unable to load emoji",
+ text = stringResource(Res.string.emoji_load_error),
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant,
)
@@ -419,7 +431,9 @@ private fun EmojiGrid(
gridItems.forEach { item ->
when (item) {
is GridItem.Header ->
- item(span = { GridItemSpan(maxLineSpan) }, key = item.key) { SectionHeader(title = item.title) }
+ item(span = { GridItemSpan(maxLineSpan) }, key = item.key) {
+ SectionHeader(title = localizedHeaderTitle(item))
+ }
is GridItem.EmojiCell ->
item(key = item.key) {
@@ -437,7 +451,7 @@ private fun EmojiGrid(
if (gridItems.none { it is GridItem.EmojiCell }) {
item(span = { GridItemSpan(maxLineSpan) }) {
Text(
- text = "No emoji found",
+ text = stringResource(Res.string.emoji_no_results),
style = MaterialTheme.typography.bodyMedium,
color = MaterialTheme.colorScheme.onSurfaceVariant,
modifier = Modifier.fillMaxWidth().padding(32.dp),
@@ -469,7 +483,8 @@ private fun buildGridItems(
results.forEachIndexed { i, emoji -> add(GridItem.EmojiCell(emoji, "search_$i")) }
} else {
if (recentEmojis.isNotEmpty()) {
- add(GridItem.Header("Recently Used", RECENTS_HEADER_KEY))
+ // Title resolved at render time via localizedHeaderTitle (recents key β†’ string resource)
+ add(GridItem.Header("", RECENTS_HEADER_KEY))
recentEmojis.forEachIndexed { i, emojiStr ->
add(GridItem.EmojiCell(Emoji(emojiStr), "$RECENTS_KEY_PREFIX$i"))
}
@@ -526,6 +541,28 @@ private fun scoreEmoji(emoji: Emoji, query: String, recentSet: Set<String>): Flo
// ── Cell Components ────────────────────────────────────────────────────────────
+/**
+ * Resolves a grid header to localized text. Category names arrive as raw English strings from `emoji-data.json`, so
+ * they are mapped to string resources here; unknown names fall back to the raw value.
+ */
+@Composable
+private fun localizedHeaderTitle(header: GridItem.Header): String = if (header.key == RECENTS_HEADER_KEY) {
+ stringResource(Res.string.emoji_recently_used)
+} else {
+ when (header.title) {
+ "Smileys & Emotion" -> stringResource(Res.string.emoji_category_smileys_emotion)
+ "People & Body" -> stringResource(Res.string.emoji_category_people_body)
+ "Animals & Nature" -> stringResource(Res.string.emoji_category_animals_nature)
+ "Food & Drink" -> stringResource(Res.string.emoji_category_food_drink)
+ "Travel & Places" -> stringResource(Res.string.emoji_category_travel_places)
+ "Activities" -> stringResource(Res.string.emoji_category_activities)
+ "Objects" -> stringResource(Res.string.emoji_category_objects)
+ "Symbols" -> stringResource(Res.string.emoji_category_symbols)
+ "Flags" -> stringResource(Res.string.emoji_category_flags)
+ else -> header.title
+ }
+}
+
@Composable
private fun SectionHeader(title: String) {
Text(

Served by rngit 1.5.4 - Generated in 0.05s